immutable class TUP{T1} < $HASH, $STR


Ancestors
$STR $HASH $IS_EQ COMPARE{_}



Public


Readable Attributes
attr t1:T1;

Writable Attributes
attr t1:T1;

Features
create(at1:T1):SAME
elt_eq(e1,e2:ETP):BOOL .. Included as elt_eq
**** The "less than" relation used in the sorting routines. Compares the object "id" by default. May be redefined in descendants.
elt_hash(e:ETP):INT .. Included as elt_hash
**** A hash value associated with an element. Must have the property that if "elt_eq(e1,e2)" then "elt_hash(e1)=elt_hash(e2)". Can be defined to always return 0, but many routines will then become quadratic. Uses object "id" by default. May be redefined in descendants.
elt_lt(e1,e2:ETP):BOOL .. Included as elt_lt
**** The "less than" relation used in the sorting routines. Compares the object "id" by default. May be redefined in descendants.
elt_nil: ETP .. Included as elt_nil
**** Return the nil value. If the element is under $NIL then return e.nil. Otherwise, return void
_
hash:INT
**** A simple hash value computed from the hash values of the component. For this to work, this must either be a value type which defines a hash value or a reference type.
is_elt_nil(e:ETP):BOOL .. Included as is_elt_nil
is_eq(e:SAME):BOOL
**** True if the component of self and `e' are equal.
is_eq(arg: $OB): BOOL .. Included as is_eq
str: STR

The Sather Home Page